
function TabberClass(pages) {

    // TabberClass.prototype = {
    //     constructor:TabberClass,
    //     sayHello:function(){
    //         console.log('hello');
    //     }
    // }


    //tabbar 下标
    var tabber_number = pages || 0
    var tabber_icon = [
        { icon: 'icon-weibiao45100847', title: '商城首页', href: 'tabbar_index.html' },
        { icon: 'icon-category', title: '全部商品', href: 'tabbar_class.html' },
        { icon: 'icon-creditlevel', title: '品牌馆', href: 'tabbar_brand.html' },
        { icon: 'icon-cart', title: '购物车', href: 'tabbar_cart.html' },
        { icon: 'icon-account', title: '个人中心', href: 'tabbar_member.html' },
    ]




    var moudlar_tabbar_template2 = {
        template: '<nav class="mui-bar mui-bar-tab" id="shop_tabbar">\
    <a class="mui-tab-item" :class="{\'mui-active\':(index==pages)}" :href="item.href" v-for="(item,index) in icons" :key="index">\
        <span class="mui-icon iconfont" :class="item.icon"></span>\
        <span class="mui-tab-label">{{item.title}}</span>\
    </a>\
</nav>',
        data() {
            return {
                pages: tabber_number,
                icons: tabber_icon
            }
        }
    }

    var router = new VueRouter({
        routes: [
            {
                path: '/',
                components: {
                    default: moudlar_tabbar_template2,
                }
            }
        ]
    })

    var moudlar_tabbar = new Vue({
        el: '#moudlar_tabbar',
        data: {
        },
        methods: {

        },
        router: router
    })

    $('#shop_tabbar a').click(function(){
        window.location.href = $(this).attr('href')
    })

}